-- Prefan Access Controller
-- Clientside Menu

PAC.MenuTitle = "PAC -- Prefan Access Controller"

if SERVER then

	PAC.ConCommand( "PAC_Menu", function( ply, _, args )
	
		umsg.Start( "PAC_Menu", ply )
		umsg.End()
		
	end )
	
end

if CLIENT then

	function PAC.Menu( UMSG )
	
		local width = 800
		local height = 400
		
		local x = ( ScrW() / 2 ) - ( width / 2 )
		local y = ( ScrH() / 2 ) - ( height / 2 )
	
		local frame = CreateFrame( x, y, width, height, PAC.MenuTitle, true, true, false, nil, frame )
			frame.Paint = function()
				surface.SetDrawColor( 0, 0, 0, 100 )
				surface.DrawRect( 0, 0, frame:GetWide(), frame:GetTall() )
			end
		
		local panel = CreatePanel( 0, 20, frame:GetWide(), frame:GetTall(), Color( 0, 0, 0, 0 ), frame, panel )

	end
	usermessage.Hook( "PAC_Menu", PAC.Menu )
	
end

PAC.AddPlugin( "Clientside Menu", "Enables the clientside menu to administrate!", "Prefanatic" )
